package com.prelearning.at_springboot.utils;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

//*定时器测试**
@Component
public class SimpleSchedule {

//    private Integer time = 0;
//    @Scheduled(cron = "*/5 * * * * ?")   //定时器定义，设置执行时间
//    private void process() {
//        System.out.println("定时器1执行"+time++);
//    }

//    @Scheduled(fixedDelay = 1000)   //定时器定义，设置执行时间 1s
//    private void process1() {
//        System.out.println("定时器2执行"+time++);
//    }
}

